<?php

class BMode
{
    /**
     * 唯一实例
     *
     * @access private
     * @staticvar
     * @var object
     */
    protected static $_instance;

    protected $_plugin;

    protected $_mode;

    function __construct()
    {
        self::$_instance = B::i();
        $this->_plugin = self::$_instance->plugin;
        $this->_mode = self::$_instance->mode;
    }

    function __get($name)
    {
        $instance = BLoader::instance("./mode_$name");
        $instance || $instance = BLoader::instance("../mode_$name");
        return $instance ? $instance : null;

    }

}

?>
